<?php
/**
 * @version		$Id: index.php 21140 2011-04-11 17:10:29Z dextercowley $
 * @package		Joomla.Site
 * @copyright	Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') or die;
JHtml::_('behavior.framework', true);
$app = JFactory::getApplication();
if($this->countModules('left and right'))
  $maincontent = '-has-left-right';
elseif($this->countModules('left') && !$this->countModules('right'))
  $maincontent = '-has-left';
elseif(!$this->countModules('left') && $this->countModules('right'))
  $maincontent = '-has-right';
elseif(!$this->countModules('left') && !$this->countModules('right'))
  $maincontent = '';
  
if($this->countModules('user1 and user2 and user3 and user4'))
  $boxwidth = '-four-box';
elseif($this->countModules('user2 and user3 and user4') || $this->countModules('user1 and user3 and user4') || $this->countModules('user1 and user2 and user4') || $this->countModules('user1 and user2 and user3'))
  $boxwidth = '-three-box';
elseif( ($this->countModules('user1 and user2') && !$this->countModules('user3 and user4')) || ($this->countModules('user1 and user3') && !$this->countModules('user2 and user4')) || ($this->countModules('user1 and user4') && !$this->countModules('user2 and user3')) || ($this->countModules('user2 and user3') && !$this->countModules('user1 and user4')) || ($this->countModules('user2 and user4') && !$this->countModules('user1 and user3')) || ($this->countModules('user3 and user4') && !$this->countModules('user1 and user2')) )
  $boxwidth = '-two-box';
elseif( ($this->countModules('user1') && !($this->countModules('user2') && $this->countModules('user3') && $this->countModules('user4'))) || ($this->countModules('user2') && !($this->countModules('user1') && $this->countModules('user3') && $this->countModules('user4'))) || ($this->countModules('user3') && !($this->countModules('user1') && $this->countModules('user2') && $this->countModules('user4'))) || ($this->countModules('user4') && !($this->countModules('user1') && $this->countModules('user2') && $this->countModules('user3'))) )
  $boxwidth = '-one-box';  

?>
<?php echo '<?xml version="1.0" encoding="utf-8"?'.'>'; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html id="html" xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>" >
<head>
	<jdoc:include type="head" />
	<?php $this->setMetaData('generator','redWEB ApS – www.redweb.dk'); ?>
  <link href='http://fonts.googleapis.com/css?family=Loved+by+the+King' rel='stylesheet' type='text/css'>    
  <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/template.css" type="text/css" />
  <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/print.css" type="text/css" media="Print" />
  <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/system.css" type="text/css" />
  <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/general.css" type="text/css" />
  <!--[if IE 9]>
    <link href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/css/ie9only.css" rel="stylesheet" type="text/css" />
  <![endif]-->  
  <!--[if IE 8]>
    <link href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/css/ie8only.css" rel="stylesheet" type="text/css" />
  <![endif]-->
  <!--[if IE 7]>
    <link href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/css/ie7only.css" rel="stylesheet" type="text/css" />
  <![endif]-->     
</head>
<body>

<div id="wrapper">
  <div id="main">                
    <div id="header">
      <div id="header-left">
				<div id="logo">
				<?php if($this->countModules('logo')) { ?>
					<jdoc:include type="modules" name="logo" style="xhtml" />    
				<?php } else { ?>
					<a href="index.php"><img src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/images/logo.png" alt="Fritzy Designs For Home" /></a>
				<?php }; ?>   
				</div>             
      </div>
      <div id="header-right">
        <div id="topright"><jdoc:include type="modules" name="topright" style="xhtml" /></div>
        <div id="header-menu"><jdoc:include type="modules" name="top-menu" style="" /></div>
        <div id="search"><jdoc:include type="modules" name="search" style="xhtml" /></div>
        <div id="login"><jdoc:include type="modules" name="login" style="xhtml" /></div>         
      </div>								
		</div>
    <div id="topmenu" align="center">
		  <jdoc:include type="modules" name="topmenu" style="xhtml" />
		</div>
    <div id="topbox">
      <div id="content-hightlight">
        <jdoc:include type="modules" name="content-hightlight" style="xhtml" />	
      </div>
  		<div id="cart">
  		  <jdoc:include type="modules" name="cart" style="xhtml" />					
  		</div>      
    </div>  
      
    <?php if($this->countModules('slideshow')): ?>
    <div id="slideshow"><jdoc:include type="modules" name="slideshow" style="" /></div>
    <?php endif; ?>		
      	
    <div id="content">
    
      <?php if($this->countModules('left')): ?>
      <div id="left"><jdoc:include type="modules" name="left" style="xhtml" /></div>
      <?php endif; ?>
      
      <div id="main-content<?php echo $maincontent; ?>">
      
        <?php if($this->countModules('adv-box1')): ?>
        <div class="adv-box">
          <div class="adv-box-inner">
            <jdoc:include type="modules" name="adv-box1" style="xhtml" />
          </div>
        </div> 
        <?php endif; ?>
        
        <div id="component"><jdoc:include type="message" /><jdoc:include type="component" /></div> 
        
        <?php if($this->countModules('adv-box2')): ?> 
        <div class="adv-box">
          <div class="adv-box-inner">
            <jdoc:include type="modules" name="adv-box2" style="xhtml" />
          </div>
        </div>  
        <?php endif; ?>
                      
      </div> 
      
      <?php if($this->countModules('right')): ?>
      <div id="right"><jdoc:include type="modules" name="right" style="xhtml" /></div>
      <?php endif; ?>   
          
    </div>
    
    <div class="clearline"></div>
   
   <?php if($this->countModules('user1 or user2 or user3 or user4')): ?>
		<div id="bottom_mod">
    
      <?php if($this->countModules('user1')): ?>
      <div class="bottom<?php echo $boxwidth; ?>"><jdoc:include type="modules" name="user1" style="xhtml" /></div>
      <?php endif; ?>
      
      <?php if($this->countModules('user2')): ?>
      <div class="bottom<?php echo $boxwidth; ?>"><jdoc:include type="modules" name="user2" style="xhtml" /></div>
       <?php endif; ?>
      
      <?php if($this->countModules('user3')): ?>
      <div class="bottom<?php echo $boxwidth; ?>"><jdoc:include type="modules" name="user3" style="xhtml" /></div>
       <?php endif; ?>
      
      <?php if($this->countModules('user4')): ?>
      <div class="bottom<?php echo $boxwidth; ?>"><jdoc:include type="modules" name="user4" style="xhtml" /></div>
       <?php endif; ?>
       
		</div>
		
		<div class="clearline"></div>
    <?php endif; ?>
	    
  </div>			
</div> 				
				
<div id="footer">
	<jdoc:include type="modules" name="footer" style="xhtml" />
</div>
		
</body>
</html>